home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX 6.2 Applications 1996 May
/
SGI IRIX 6.2 Applications 1996 May.iso
/
dist
/
impr_dev.idb
/
usr
/
impressario
/
src
/
drivers
/
phandler
/
phandler.h.z
/
phandler.h
Wrap
C/C++ Source or Header
|
1996-05-06
|
3KB
|
90 lines
/**************************************************************************
*
* Copyright (c) 1992 Silicon Graphics, Inc.
* All Rights Reserved
*
* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF SGI
*
* The copyright notice above does not evidence any actual of intended
* publication of such source code, and is an unpublished work by Silicon
* Graphics, Inc. This material contains CONFIDENTIAL INFORMATION that is
* the property of Silicon Graphics, Inc. Any use, duplication or
* disclosure not specifically authorized by Silicon Graphics is strictly
* prohibited.
*
* RESTRICTED RIGHTS LEGEND:
*
* Use, duplication or disclosure by the Government is subject to
* restrictions as set forth in subdivision (c)(1)(ii) of the Rights in
* Technical Data and Computer Software clause at DFARS 52.227-7013,
* and/or in similar or successor clauses in the FAR, DOD or NASA FAR
* Supplement. Unpublished - rights reserved under the Copyright Laws of
* the United States. Contractor is SILICON GRAPHICS, INC., 2011 N.
* Shoreline Blvd., Mountain View, CA 94039-7311
**************************************************************************
*
* Description:
* Printer driver for generic parallel printers on /dev/plp.
*
* See Also:
* phandler.c
*
**************************************************************************/
#include <string.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/plp.h>
#include <sys/file.h>
#include <sys/types.h>
#include <sys/prctl.h>
#include <sys/wait.h>
#include <signal.h>
#include <getopt.h>
#include <pod.h>
typedef unsigned char Boolean;
#define TRUE 1 /* pseudo-boolean value */
#define FALSE 0 /* pseudo-boolean value */
#define COARSEDETAIL 1
#define MEDIUMDETAIL 2
#define FINEDETAIL 3
/* Exit codes on errors. */
#define NO_ERROR 0
#define UNKNOWN 1
#define BAD_ARG 2
#define BAD_POD_ACCESS 3
#define BAD_DEVICE_NAME 4
#define BAD_DEVICE_TYPE 5
#define BAD_STATUS_UPDATE 6
#define BAD_DEVICE_ACCESS 7
#define BAD_MEMORY_REFERENCE 8
#define BAD_MEMORY_ALLOC 9
#define BAD_DATA_FORMAT 10
#define BAD_DATA_HEADER 11
#define BAD_DATA_SHORT_FILE 12
#define BAD_CODE_SHORT_FILE 13
#define BAD_DATA_FILE 14
#define BAD_TRANSMISSION 15
#define BAD_DATA_BUFFER 16
#define BAD_TEST_PRINT 17
#define BAD_COMPRESSION 18
#define DEFAULT_PAGE_SIZE PD_SIZE_A
/* Function prototypes */
int update_status(int cur_status);
void cleanup_and_quit(int exitcode);
void print_usage_message(void);
/*
int ioctl(int fildes, int request, ...);
int flock(int fd, int operation);
*/